package com.hzdy.master.entity.table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hzdy.master.entity.data.DataElement;
import com.hzdy.master.entity.Detail;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LALA
 * Date: 2019-03-11
 * Time: 9:25
 */
@Getter
@Setter
@Entity
@Table(name = "form_field")
public class FormField extends Detail implements Serializable {

    //字段类型
    private String fieldType;

    private String fieldName;
    //字段长度
    private Integer fieldSize;

    //是否为空
    private Boolean isNull;

    // 默认值
    private String defaults ;

    //小数点精度
    private Integer accuracy;

    @ManyToOne(
            cascade = CascadeType.REFRESH,
            fetch=FetchType.LAZY
    )
   /* @JsonIgnore*/
    private CreateTable createTable;

    //数据元
    @OneToOne
    private DataElement dataElement;

}
